1. Field of the Invention
The present invention relates to image coding apparatuses and methods, image decoding apparatuses and methods, image transmission methods and image recording media, and in particular, to an image coding apparatus and method, an image decoding apparatus and method, an image transmission method, and an image recording medium, adapted for transmission of image signals by using transmitters having various transmission rates, such as an analog or digital telephone line and a leased data transmission line, and for the recording of the image signals to storage media having various storage capacities, such as an optical disc, a magnetic disc and a random access memory.
2. Description of the Related Art
One of methods for coding an image is an image coding method hating the function of object scalability. As shown in FIG. 9, when an image is coded with the object scalability, an object in the image is cut out separately from the remaining background before it is coded. An area of the object to be cut out is indicated by a "shape", and information on the brightness and color difference of the object cut out is indicated by a "texture". In this method a coding apparatus codes the background image, and the texture and shape for each object. A decoding apparatus decodes the coded background image and the texture and shape coded for each object, and combines the decoded texture with the background image, based on the location indicated by the shape. The shape information is also called the "key image", which is expressed as a binary or multivalued image. The texture cut out is also called the "fill image."
Using the object scalability enables control of each object and adjustment of the image quality of each object. By operating each object, only an interesting object can be down-loaded, and an arbitrary object can be combined with another image. In adjusting the image quality of each object, the image can be coded such that the image is separated into an important body and a background, and the important body is finely quantized, while the background is roughly quantized. At this time, by using the amount of code reduction caused by the rough quantization of the background in order to quantize the important object finely, the identical amount of total codes generated can improve the subjective image quality.
In order to use the above-mentioned advantages, the coding of the shape information itself is important. Similar to other coding methods, the shape-information coding method has the following preferable characteristics: a small amount of codes generated, strong durability against errors in a storage medium or transmission line, and small delay caused by coding or decoding.
In image coding, one frame (one image) is divided into blocks of 16.times.16 pixels as shown in FIG. 10 in consideration of, in general, ease of motion compensation and affinity with the discrete cosine transform (DCT). One block is the unit of processing. One block of 16.times.16 pixels is called a "macroblock". An image (frame) to be coded is divided into macroblocks, and the macroblocks are processed from the top row to the bottom row, and in a row they are processed from left to right. A set of an arbitrary number of macroblocks combined in the order given is called a "slice". As shown in FIG. 11, normally, slices are defined so that each slice does not occupy two or more rows. However, as shown in FIG. 12, in general, the slices can be arbitrarily defined.
FIG. 13 shows a coding apparatus using the object scalability.
A flow of processing by the coding apparatus shown in FIG. 13 is as follows (here, for simplified explanation, the coding of a shape and a texture with respect to one object will be described):
A shape input from a shape input terminal 1 is stored in a shape input buffer 2. A shape frame encoder 3 codes the shape stored in the shape input buffer 2 frame by frame, and sends the coded shape to a switch 12.
Coding methods which can be employed by the shape frame encoder 3 include the following four methods: one based on the modified modified relative element address designate (MMR) coding as a facsimile coding method; one based on the joint bi-level image expert group (JBIG) (whose details are described than Television Society of Japan, vol. 48, No. 1, pp. 65-68 (1994)); one based on the chain coding of the boundary between the interior and exterior of a body by using its starting point and successive direction; and one based on the quad-tree in which a case with all the leaves being identical is omitted.
A texture input from a texture input terminal 4 is stored in a texture input buffer 5. A texture frame encoder 6 codes the texture stored in the texture input buffer 5 frame by frame, and sends the coded texture to the switch 12.
Coding by the texture frame encoder 6 is performed by devices shown in the dotted-line frame in FIG. 12. Since the texture is input to the texture input terminal 4 in the order of raster scanning, in a texture slice buffer 7 each texture is divided into slices composed of a plurality of macroblocks, and the macroblocks are stored. At this time, a signal for defining the slices is sent from a slice controller 11 to the texture slice buffer 7. A texture slice encoder 8 codes the texture supplied from the texture slice buffer 7, and sends the generated codes to a switch 10. In the texture slice encoder 8 the coding is performed normally in units of macroblocks. In the coding there is employed a coding method including the motion compensation and the DCT so that the intra-coding which performs coding within one texture, and the inter-coding which performs coding with chronologically input textures are selected. In the coding of motion in order to be used in the motion compensation in the inter-coding, and the coding of dc components in the DCT, the interrelation of the macroblocks is also used. The interrelation of the macroblocks is not used in the coding of macroblocks having different slices. Thus, the coding is closed in each slice.
The switch 10 alternately selects a synchronization code generated by a synchronization code generator 9 or a texture code for one slice generated by the texture slice encoder 8, and outputs it. At this time the switch 10 is controlled based on the signal for defining slices sent from the slice controller 11.
The switch 12 alternately selects the shape code for one frame generated by the shape frame encoder 3 or the texture codes for one frame output from the switch 10, and outputs it to a code output terminal 13. The switch 12 is controlled such that a signal representing the termination of coding for one frame is sent from the shape frame encoder 3 or the texture slice encoder 8 to the switch 12.
The codes generated by the coding apparatus shown in FIG. 13 are decoded by a decoding apparatus shown in FIG. 14. In the decoding apparatus the codes input from a code input terminal 21 are separated in the order of the shape code and the texture code, and the separated codes are sent frame by frame to a shape frame decoder 23 and a texture frame decoder 26, respectively. A switch 22 is controlled such that the switch 22 receives a signal representing the termination of decoding for one frame from the shape frame decoder 23 or a texture slice decoder 28 in the texture frame decoder 26.
The shape frame decoder 23 decodes the input shape code for one frame. The decoded shape for one frame is output from a shape output terminal 25 via a shape output buffer 24.
The texture frame decoder 26 decodes the input texture code for one frame. Decoding by the texture frame decoder 26 is performed by devices shown in a dotted-line frame in FIG. 14. The input to the texture frame decoder 26 is supplied to a synchronization detector 27 and a texture slice decoder 28. The synchronization detector 27 detects a synchronization code when the synchronization code appears in the input code, and sends a reset signal to the texture slice decoder 28. The texture slice decoder 28 decodes the code for one slice input after the reset signal is sent from the synchronization detector 27, and it sends the decoded texture to a texture slice buffer 29. The decoded texture in the texture slice buffer 29 is sent to a texture output buffer 30 and stored therein. The texture for one frame stored in the texture output buffer 30 is output in the order of raster scanning from a texture output terminal 31.
From the texture (not shown) output from the texture output terminal 31, a portion designated by the shape output from the shape output terminal 25 is cut out, and the portion is combined with another image. The composite image is displayed.
The synchronization code included in the code representing the texture includes a location on the decoded image of the successive slice. Thus, even if an errors occur in the texture code, the synchronization code is durable against the error in that the decoding can be performed from the successive slice.
As described above, when an error occurs in the codes, the conventional decoding apparatus enables restoration in the successive slice if the error occurs in the texture code because the synchronization codes are added in units of slices, but cannot enable restoration in the same frame if the error occurs in the shape code. When the shape cannot be decoded, if the texture can be decoded, its image cannot be displayed on the decoded image. Accordingly, an error in the shape hinders the displaying of the frame to its end, which causes a problem in which, although the synchronization code is used, the conventional decoding apparatus is weak in an error in the code portion.
The above coding apparatus codes the shapes for one frame before coding the corresponding texture, which causes a coding delay for one frame. In addition, the shapes for one frame are decoded before the corresponding texture is decoded, which causes a decoding delay for one frame.
Namely, the delays in coding and decoding are disadvantageously long.